#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 2e4 + 10;

/*
solution 1:
since ai <= 100000 && ai >= 0 
we can make ai = k*x + i      k >=1 && x > 100000
so we can make x = 200000

solution 2:


*/

int n;
int q[N];
vector<vector<int>> op;

void f(int op, int idx, int x){
    if(op == 1){
        for(int i = 1; i <= idx; i ++) q[i] += x;
    }else{
        for(int i = 1; i <= idx; i ++) q[i] %= x;
    }
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n;
    for(int i = 1; i <= n; i ++){
        cin >> q[i];
    }


    int x = 100010;
    for(int i = n; i >= 1; i --){

        int p = x + i - (q[i] % x);

        vector<int> temp = {1, i, p};
        f(1, i, p);
        op.push_back(temp);
    }

    f(2, n, x);
    vector<int> t = {2, n, x};
    op.push_back(t);

    cout << op.size() << '\n';
    for(int i = 0; i < op.size(); i ++){

        for(int j = 0; j < op[i].size(); j ++){
            cout << op[i][j] << " ";
        }
        cout << '\n';
    }

//    for(int i = 1; i <= n; i ++) cout << q[i] << " ";


    return 0;
}